#ifndef PROTEINRENDERCONTROL_H
#define PROTEINRENDERCONTROL_H

#include <vector>

#include <QWidget>
#include <QStringList>
#include "ui_proteinrendercontrol.h"

namespace PBVP {
	class ProteinRenderer;
	class ProteinRenderControl : public QWidget
	{
		Q_OBJECT

	public:
		ProteinRenderControl(ProteinRenderer *pRenderer, QWidget *parent = 0);
		~ProteinRenderControl();

		///
		void setChainSelect(const QStringList& names) {
			ui.chainSelect->addItems(names);
		}

		///
		void setLigandSelect(const QStringList& names) {
			ui.ligandSelect->addItems(names);
			ligandVec.resize(names.size());
			for(int i = 0; i < names.size(); i++) {
				ligandVec[i] = false;
			}
		}

		std::vector<bool>& getLigandVector() {
			return ligandVec;
		}

	private slots:
		//
		void toggleLigandShow(int state);

		//
		void changeSelectedLigand(int id);

	private:
		Ui::ProteinRenderControlClass ui;
		ProteinRenderer *m_pRenderer;
		/// vector indicating whether a ligand is displayed
		std::vector<bool> ligandVec;
	};
}
#endif // PROTEINRENDERCONTROL_H
